-------------------------------------------------------------------------------
--	 File name: shared.lua
--		Author: Sploder
-- 		  Date: 04/5/2010
-- Description: This file contains the definitions shared between the client
--					and the server for Cirno's ice columns.
--
-------------------------------------------------------------------------------

-- Define the entity's spawn info.
ENT.Type			= "anim"
ENT.Base			= "base_entity"
ENT.PrintName		= "Ice Column"
ENT.Author			= "Sploder"
ENT.Contact			= ""
ENT.Purpose			= ""
ENT.Instructions	= "For weapon use only"

-------------------------------------------------------------------------------
--	  Function: ENT:Initialize()
-- Description: This function initializes the entity.
-------------------------------------------------------------------------------
function ENT:Initialize()
	if (SERVER)
	then	
		self.damage		= 5		-- This is the amount of damage the icicle does on impact.
		self.timer = CurTime() + 5	-- This is the time at which the entity will die, regardless of collisions.
		self.timer2 = CurTime() + 0.25	-- This is the time at which the entity will stop moving
		self.strength = 2000			-- The strength of the force with which to throw hit entities.

		self.Entity:SetModel("models/danmaku/cirno/cirnocolumn.mdl")	-- Set the model.
		self.Entity:SetColor(255, 255, 255, 255)	-- Set the color.
			
		self.Entity:PhysicsInit(SOLID_VPHYSICS)		-- Make collisions be with the actual model.
		self.Entity:SetMoveType(MOVETYPE_VPHYSICS)	-- Set moving for physics.
		self.Entity:SetSolid(SOLID_VPHYSICS)		-- Set the object to solid.
		self:SetTrigger(true)
		self:DrawShadow(true)						-- DO draw shadows for this thing.
		--self:SetCollisionGroup(COLLISION_GROUP_INTERACTIVE_DEBRIS)
		
	else
		self.dead = false			-- This keeps track of whether the entity is alive or not.
	end
end